package com.youease.chris.control
{
	import com.youease.chris.MyAppFacade;
	import com.youease.chris.view.mediator.MapEditMediator;
	import com.youease.chris.view.mediator.ToolPanelMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class ViewPrepCommand extends SimpleCommand implements ICommand
	{
		public function ViewPrepCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void {
			var mainApp:MapEdit = notification.getBody() as MapEdit;
			this.facade.registerMediator(new MapEditMediator(mainApp));
			this.facade.registerMediator(new ToolPanelMediator(mainApp.tools));
			this.sendNotification(MyAppFacade.APP_STARTUP_OVER);
		}
	}
}